<!DOCTYPE html>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no" />
		<meta content="yes" name="apple-mobile-web-app-capable" />
		<meta content="black" name="apple-mobile-web-app-status-bar-style">
		<meta content="telephone=no" name="format-detection" />
		<meta content="emai=no" name="format-detection" />
		<link rel="stylesheet" type="text/css" href="<?php echo STATIC_HOST?>shared/css/shared.css" />
		<link rel="stylesheet" type="text/css" href="<?php echo STATIC_HOST?>gene/css/common.css" />
		<link rel="stylesheet" type="text/css" href="<?php echo STATIC_HOST?>gene/css/success.css" />
		<script type="text/javascript" src="<?php echo STATIC_HOST?>shared/js/zepto-1.1.6.js"></script>
		<script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
		<script async="" charset="UTF-8" src="//static.meiqia.com/dist/meiqia.js?v=20"></script>
		<title>支付成功</title>
		<script type='text/javascript'>
			(function (m, ei, q, i, a, j, s) {
				m[a] = m[a] || function () {
						(m[a].a = m[a].a || []).push(arguments)
					};
				j = ei.createElement(q),
					s = ei.getElementsByTagName(q)[0];
				j.async = true;
				j.charset = 'UTF-8';
				j.src = i + '?v=' + new Date().getUTCDate();
				s.parentNode.insertBefore(j, s);
			})(window, document, 'script', '//static.meiqia.com/dist/meiqia.js', '_MEIQIA');
			_MEIQIA('entId', '20405');
			_MEIQIA('withoutBtn');
			_MEIQIA('init');
		</script>
		<script>
			Zepto(function ($) {
				function onBridgeReady() {
					WeixinJSBridge.call('showOptionMenu');
				}

				if (typeof WeixinJSBridge == "undefined") {
					if (document.addEventListener) {
						document.addEventListener('WeixinJSBridgeReady', onBridgeReady, false);
					} else if (document.attachEvent) {
						document.attachEvent('WeixinJSBridgeReady', onBridgeReady);
						document.attachEvent('onWeixinJSBridgeReady', onBridgeReady);
					}
				} else {
					onBridgeReady();
				}

				
				wx.config({
		            debug: false,
		            appId: '<?php echo $jsapi['js_config']['appId']?>',
		            timestamp: <?php echo $jsapi['js_config']['timestamp']?>,
		            nonceStr: '<?php echo $jsapi['js_config']['noncestr']?>',
		            signature: '<?php echo $jsapi['js_config']['signature']?>',
		            jsApiList: [
		                'onMenuShareTimeline',
		                'onMenuShareAppMessage'
		            ]
		        });

				 wx.ready(function () {
			            wx.onMenuShareTimeline({
			                title: '<?php echo $jsapi['share_title'];?>',
			                link: '<?php echo $jsapi['share_url']?>', // 分享链接
			                imgUrl: 'http://wx.zhishimama.com/img/salon_offline.png', // 分享图标
			                success: function () {
			                    // 用户确认分享后执行的回调函数
			                },
			                cancel: function () {
			                    // 用户取消分享后执行的回调函数
			                }
			            });

			            wx.onMenuShareAppMessage({
			                title: '<?php echo $jsapi['share_title']?>',
			                desc: '<?php echo $jsapi['share_content'];?>', // 分享描述
			                link: '<?php echo $jsapi['share_url']?>', // 分享链接
			                imgUrl: 'http://wx.zhishimama.com/img/salon_offline.png', // 分享图标
			                type: 'link', // 分享类型,music、video或link，不填默认为link
			                dataUrl: '', // 如果type是music或video，则要提供数据链接，默认为空
			                success: function () {
			                    // 用户确认分享后执行的回调函数
			                },
			                cancel: function () {
			                    // 用户取消分享后执行的回调函数
			                }
			            });
			        });
				
			});
		</script>
	</head>
	<body>
		<div class="wrapper">
			<?php echo $product_html['pay_success_html']  ?>
			<ul class="service flex-wrapper flex-pack-justify">
				<li>
					<a href="javascript:void(0)" onclick="_MEIQIA('showPanel')"><img src="<?php echo STATIC_HOST?>gene/img/d_online.png"></a>
				</li>
				<li>
					<a href="tel:4008210418"><img src="<?php echo STATIC_HOST?>gene/img/d_phone.png"></a>
				</li>
			</ul>
			<?php if($product_recommend_image):?>
			<div class="invitation">
				<p>恭喜您成为芝士妈妈代言人，芝士妈妈奉上您的分享专属二维码，通过此二维码您的好友可以获得折扣红包，下单可抵扣现金哦~同时您将获得一笔代言费，分享越多，获益越多！</p>
				<p class="title">
					专属邀请卡<br >
					<img class="arrow" src="<?php echo STATIC_HOST?>gene/img/d_arrow.png" />
				<p>
					<img class="qrcode" src="<?php echo STATIC_IMAGE . $product_recommend_image?>" />
				<p class="notice">
					长按保存图片，发送给好友即可。<br/> 芝士妈妈保留对芝妈优选代言规则的最终解释权。
				</p>
			</div>
			<?php endif;?>

		</div>
		<footer>
			<ul>
            <li>
                <a href="/bind/sample/index?id=<?php echo $order[0]['product_id']?>" class="btn btn-green"><span class="icon icon-blood"></span>样本绑定</a>
            </li>
            <li>
                <a href="/product/detail?id=<?php echo $order[0]['product_id']?>" class="btn btn-blue"><span class="icon icon-book"></span>预 约</a>
            </li>
            <li>
                <a href="/sale/check/index?id=<?php echo $order[0]['product_id']?>" class="btn btn-red"><span class="icon icon-test"></span>我的检测</a>
            </li>
        </ul>
		</footer>
	</body>
</html>